﻿<Window x:Class="TorchView.SharedStashEditor.Views.AddEffectView" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:helper="clr-namespace:TorchView.SharedStashEditor.Helpers"
        xmlns:local="clr-namespace:TorchView.SharedStashEditor"
        Title="Add Effect:" 
        WindowStartupLocation="CenterScreen" 
        Style="{StaticResource DialogWindowStyle}">


    <Window.Resources>
        <helper:EffectCategoryConverter x:Key="EffectCategoryConverter" />
    </Window.Resources>

    <Grid Margin="7">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <ComboBox Grid.Row="0" Grid.ColumnSpan="2" Width="200" Margin="0,7" Name="EffectCategories" ItemsSource="{Binding EffectCategories}"/>
        <ListBox Grid.Row="1" Grid.ColumnSpan="2" Height="200" Margin="0,7" Name="EffectList" ItemsSource="{Binding ElementName=EffectCategories, Path=SelectedItem, Converter={StaticResource EffectCategoryConverter}}" SelectedItem="{Binding SelectedEffect}"/>

        <Button Grid.Row="2" HorizontalAlignment="Right" Content="OK" IsDefault="True" Command="{Binding OKCommand}" Margin="7,0" />
        <Button Grid.Row="2" Grid.Column="1" HorizontalAlignment="Right" Content="Cancel" IsCancel="True" />
    </Grid>
</Window>
